

package com.hexinfo.dmpro.sparing.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hexinfo.dmpro.common.model.ClusterSparingConf;
import com.hexinfo.dmpro.sparing.dto.BatchSyncTypeDTO;
import com.hexinfo.dmpro.sparing.dto.ScanMetadataDTO;
import com.hexinfo.dmpro.sparing.dto.ScanSyncRuleDTO;
import com.hexinfo.dmpro.sparing.model.HiveTableInfo;
import com.hexinfo.dmpro.sparing.model.ScanMetadata;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * 元数据扫描表
 *
 * @author yemw
 * @date 2023-08-28 15:44:04
 */
public interface ScanMetadataService extends IService<ScanMetadata> {
    Page queryList(Page page, ScanMetadata scanMetadata);

    String hiveMetadataToOracle(String source);
    @Transactional
    String hiveSqlOracleIncrement(String source);

    List<ScanMetadata> qyScanMetadataWhere(ScanSyncRuleDTO dto);

    List<ScanMetadata> qyScanMetadataWhereWord(ScanSyncRuleDTO dto);

    List<ScanMetadata> qyScanMetadataTable(ScanSyncRuleDTO dto);

    List<ScanMetadata> qyScanMetadataWhereYQR(ScanSyncRuleDTO dto);

    ClusterSparingConf wrapperClusterSparingConf(LambdaQueryWrapper<ClusterSparingConf> wrapper, String clusterName);

    List<ScanMetadata> wrapperScanMetadata(LambdaQueryWrapper<ScanMetadata> wrapper);

    int updateToSyncType(String syncType,String syncRuleId,String partName,String location);

    boolean updateBatchSyncType(BatchSyncTypeDTO dto);

    boolean syncConfIdChange(ScanMetadataDTO dto);

    int lsHdfs(String baseName);

    List<String> queryTimePartitionTable();

}
